package com.ydh.company.pojo;


import com.ydh.company.flag.PurchaseOrderFlag;
import com.ydh.company.pojo.Goods;
import com.ydh.company.pojo.Supplier;
import com.ydh.company.pojo.User;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.List;

public class PurchaseOrderDetail {
@ApiModelProperty(name = "purchaseOrderDetailId",notes = "采购订单详情表id",dataType = "String",required = false)
  private String purchaseOrderDetailId;
  @NotBlank(message = "采购单号不能为空",groups = {PurchaseOrderFlag.class})
  @ApiModelProperty(name = "purchaseOrderNumber",notes = "采购订单号",dataType = "String",required = true)
  private String purchaseOrderNumber;
  @NotBlank(message = "商品id不能为空",groups = {PurchaseOrderFlag.class})
  @ApiModelProperty(name = "goodsId",notes = "商品id",dataType = "string",required = true)
  private String goodsId;
  @NotBlank(message = "采购数不能为空",groups = {PurchaseOrderFlag.class})
  @Pattern(regexp = "[1-9]\\d*",message = "采购数只能输入正整数")
  @ApiModelProperty(name = "purchaseNumber",notes = "采购数",dataType = "string",required = true)
  private String purchaseNumber;
  @Pattern(regexp = "[1-9]\\d*.\\d*|0\\.\\d*[1-9]\\d*",message = "只能传正浮点数",groups = {PurchaseOrderFlag.class})
  @NotBlank(message = "采购单价不能为空",groups = {PurchaseOrderFlag.class})
  @ApiModelProperty(name = "purchaseCost",notes = "采购单价",dataType = "string",required = true)
  private Double purchaseCost;
  @ApiModelProperty(name = "purchaseOrderMainId",notes = "采购订单id",dataType = "string",required = false)
  private String purchaseOrderMainId;
  private Goods goods;

  public String getPurchaseOrderMainId() {
    return purchaseOrderMainId;
  }

  public void setPurchaseOrderMainId(String purchaseOrderMainId) {
    this.purchaseOrderMainId = purchaseOrderMainId;
  }

  public Double getPurchaseCost() {
    return purchaseCost;
  }

  public void setPurchaseCost(Double purchaseCost) {
    this.purchaseCost = purchaseCost;
  }

  public String getPurchaseOrderDetailId() {
    return purchaseOrderDetailId;
  }

  public void setPurchaseOrderDetailId(String purchaseOrderDetailId) {
    this.purchaseOrderDetailId = purchaseOrderDetailId;
  }

  public String getPurchaseOrderNumber() {
    return purchaseOrderNumber;
  }

  public void setPurchaseOrderNumber(String purchaseOrderNumber) {
    this.purchaseOrderNumber = purchaseOrderNumber;
  }

  public String getGoodsId() {
    return goodsId;
  }

  public void setGoodsId(String goodsId) {
    this.goodsId = goodsId;
  }

  public String getPurchaseNumber() {
    return purchaseNumber;
  }

  public void setPurchaseNumber(String purchaseNumber) {
    this.purchaseNumber = purchaseNumber;
  }

  public Goods getGoods() {
    return goods;
  }

  public void setGoods(Goods goods) {
    this.goods = goods;
  }
}
